package cn.com.connext.scrm.repository.master;

import cn.com.connext.scrm.domain.master.DwaUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DWAUserRepository extends JpaRepository<DwaUser, String>, JpaSpecificationExecutor<DwaUser> {

    @Query(value = "select d.mobile from DwaUser d where d.deleted = false and d.code is not null group by d.mobile")
    List<String> findAllMobile();
    @Query(value = "select d.unionId from DwaUser d where d.deleted = false and d.code is not null")
    List<String> findAllUnionId();
}
